<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8" />
<title>订单管理 - 导出快递信息</title>
<?php include($this->c['_homes']['_viewsHome'].'/_global/_head.php');?>
<link rel="stylesheet" type="text/css" href="/style/assets/plugins/bootstrap-datetimepicker/css/datetimepicker.css" />
</head>
<!-- BEGIN BODY -->
<body class="page-header-fixed page-sidebar-fixed">
<!-- BEGIN HEADER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/head.php');?>
<!-- END HEADER -->
<div class="clearfix"></div>
<!-- BEGIN CONTAINER -->
<div class="page-container" > 
  <!-- BEGIN HORIZONTAL MENU PAGE SIDEBAR1 -->
  <?php include($this->c['_homes']['_viewsHome'].'/_global/menu.php');?>
  <!-- END BEGIN HORIZONTAL MENU PAGE SIDEBAR --> 
  <!-- BEGIN PAGE -->
  <div class="page-content"> 
    <!-- BEGIN PAGE HEADER-->
    <div class="row">
      <div class="col-md-12"> 
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title"> 导出快递信息 </h3>
        <ul class="page-breadcrumb breadcrumb">
          <li> <i class="icon-home"></i> <a href="/manage">后台</a> <i class="icon-angle-right"></i> </li>
          <li> 订单管理 <i class="icon-angle-right"></i> </li>
          <li> <a href="/order/olist">订单列表</a> <i class="icon-angle-right"></i> </li>
          <li>导出快递信息</li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB--> 
      </div>
    </div>
    <!-- END PAGE HEADER--> 
    <!-- BEGIN PAGE CONTENT-->
    
    <div class="row">
      <div class="col-md-9"> 
        <!-- BEGIN SAMPLE FORM PORTLET-->
        <div class="portlet box blue">
          <div class="portlet-title">
            <div class="caption"> <i class="icon-reorder"></i> 导出快递信息 </div>
            <div class="tools"> <a href="" class="collapse"></a> </div>
          </div>
          <div class="portlet-body form">
            <form method="post" class="form-horizontal" action="exportdo" onsubmit="return chkfrm();">
              <input type="hidden" name="act" value="express" />
              <div class="form-body">
                <div class="form-group">
                  <label class="control-label col-md-1"></label>
                  <div class="alert alert-info col-md-9">
                  说明：只会导出付款成功的订单快递信息，且是未发货的订单
                  </div>
                </div>
                <div class="form-group">
                  <label class="control-label col-md-2">开始时间</label>
                  <div class="col-md-4">
                    <div class="input-group date form_datetime" data-date="<?=date("Y-m-d\T00:00:00\Z");?>">
                      <input type="text" size="16" name="export_start_date" id="_export_start_date" class="form-control">
                      <span class="input-group-btn">
                      <button class="btn default date-reset" type="button"><i class="icon-remove"></i></button>
                      </span> <span class="input-group-btn">
                      <button class="btn default date-set" type="button"><i class="icon-calendar"></i></button>
                      </span> </div>
                    <!-- /input-group --> 
                  </div>
                </div>
                <div class="form-group">
                  <label class="control-label col-md-2">结束时间</label>
                  <div class="col-md-4">
                    <div class="input-group date form_datetime" data-date="<?=date("Y-m-d\T23:59:59\Z");?>">
                      <input type="text" size="16" name="export_end_date" id="_export_end_date" class="form-control">
                      <span class="input-group-btn">
                      <button class="btn default date-reset" type="button"><i class="icon-remove"></i></button>
                      </span> <span class="input-group-btn">
                      <button class="btn default date-set" type="button"><i class="icon-calendar"></i></button>
                      </span> </div>
                    <!-- /input-group --> 
                  </div>
                </div>
                <hr>
                <div class="form-group">
                  <label class="control-label col-md-2">快递公司</label>
                  <div class="col-md-4">
                    <select class="form-control" name="express_id" id="_express_id">
                    <option value="">选择快递公司</option>
                    <?php
                    if($this->c['para']['express_company']){
                      foreach($this->c['para']['express_company'] as $k=> $r){
                        if(isset($this->data['para']['express_id']) && $k==$this->data['para']['express_id']) $slk = ' selected';
                        else $slk = '';
                        ?>
                        <option value="<?=$k;?>"<?=$slk;?>><?=$r;?></option>                        
                    <?
                        
                      }
                    }
                    ?>
                 </select>
                  </div>
                </div>
                <hr>
              </div>
              <div class="form-actions fluid">
                <div class="col-md-offset-3 col-md-9">
                  <button type="submit" class="btn blue">提交</button>
                </div>
              </div>
            </form>
          </div>
        </div>
        <!-- END SAMPLE FORM PORTLET--> 
        
      </div>
    </div>
    <!-- END PAGE CONTENT--> 
  </div>
  <!-- END PAGE --> 
</div>
<!-- END CONTAINER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/_footer.php');?>
<script type="text/javascript" src="/style/assets/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script> 
<script type="text/javascript" src="/style/assets/plugins/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script> 
<script type="text/javascript">
var handleDatetimePicker = function () {
  $(".form_datetime").datetimepicker({
    language:'zh-CN',
    autoclose: true,
    format: "yyyy-mm-dd hh:ii"
  }); 
  $('body').removeClass("modal-open"); // fix bug when inline picker is used in modal
}
jQuery(document).ready(function() {    
   App.init();
   handleDatetimePicker();
  
});

function chkfrm(){
  if( $("#_export_start_date").prop("value")==""){
    alert("请选择开始时间");
    $("#_export_start_date").focus();
    return false;
  }

  if( $("#_export_end_date").prop("value")==""){
    alert("请选择结束时间");
    $("#_export_end_date").focus();
    return false;
  }

  if( $("#_express_id").val()==""){
    alert("请选择快递公司");
    $("#_express_id").focus();
    return false;
  }
}
</script> 
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>